﻿using System.Web.Mvc;
using System.Web.Security;


namespace Wayloop.Blog.Presentation.Controllers.Admin
{
    public class UserController : AbstractController
    {
        [AcceptVerbs(HttpVerbs.Get)]
        public ActionResult Login()
        {
            return View();
        }


        [AcceptVerbs(HttpVerbs.Post), ValidateAntiForgeryToken]
        public ActionResult Login(string username, string password, FormCollection formValues)
        {
            if (FormsAuthentication.Authenticate(username, password)) {
                FormsAuthentication.RedirectFromLoginPage(username, false);
            }

            return View();
        }
    }
}